package com.taotao.sys.controller;

import com.taotao.common.RespData;
import com.taotao.common.annotation.CurrUserId;
import com.taotao.sys.entity.SysFunc;
import com.taotao.sys.service.SysFuncService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;



/**
 * <p>
 * 系统功能控制器
 * </p>
 *
 * @author Fan Beibei
 * @version V1.0
 * @since 2025-05-18 23:03:09
 */
@Slf4j
@Api(tags = "系统功能接口")
@RestController
@RequestMapping("/sys/func")
public class SysFuncController{

    @Autowired
    private SysFuncService sysFuncService;


    @ApiOperation(value = "根据ID查询", notes = "")
    @ResponseBody
    @GetMapping("/queryById")
    public RespData<SysFunc> queryById(@RequestParam("id") java.lang.Long id) {

//        SysFunc sysFunc = sysFuncService.queryById(id);

        return RespData.successResp();

    }


    @ApiOperation(value = "批量删除", notes = "")
    @ResponseBody
    @PostMapping("/batchDel")
    public RespData<Integer> batchDel(@RequestBody Set<java.lang.Long> ids, @CurrUserId Long userId) {

//        int effectCount = sysFuncService.softDelByIds(ids, userId);

        return RespData.successResp();

    }


    @ApiOperation(value = "新增或更新", notes = "")
    @ResponseBody
    @PostMapping("/addOrUpdate")
    public RespData<java.lang.Long> addOrUpdate(@RequestBody SysFunc param, @CurrUserId Long userId) {

//        java.lang.Long id =sysFuncService.addOrUpdate(param, userId);

        return RespData.successResp();

    }


}
